package com.guodefu.sensitive.config;

import com.guodefu.sensitive.handler.BankCardSensitiveStrategy;
import com.guodefu.sensitive.handler.DefaultSensitiveStrategy;
import com.guodefu.sensitive.handler.EmailSensitiveStrategy;
import com.guodefu.sensitive.handler.IdCardSensitiveStrategy;
import com.guodefu.sensitive.handler.NameSensitiveStrategy;
import com.guodefu.sensitive.handler.PhoneSensitiveStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@Import({SensitiveStrategyContext.class, SensitiveAnnotationIntrospector.class})
public class SensitiveAutoConfiguration {

    @Bean
    public SensitiveStrategy defaultSensitiveStrategy() {
        return new DefaultSensitiveStrategy();
    }

    @Bean
    public SensitiveStrategy emailSensitiveStrategy() {
        return new EmailSensitiveStrategy();
    }

    @Bean
    public SensitiveStrategy idCardSensitiveStrategy() {
        return new IdCardSensitiveStrategy();
    }

    @Bean
    public SensitiveStrategy nameSensitiveStrategy() {
        return new NameSensitiveStrategy();
    }

    @Bean
    public SensitiveStrategy phoneSensitiveStrategy() {
        return new PhoneSensitiveStrategy();
    }

    @Bean
    public SensitiveStrategy bankCardSensitiveStrategy() {
        return new BankCardSensitiveStrategy();
    }
}